package com.wzk.travelspringboot.controller.admin;

import com.wzk.travelspringboot.dto.Result;
import com.wzk.travelspringboot.service.CountService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangzikang
 */
@Slf4j
@RestController
@RequestMapping("/count")
@RequiredArgsConstructor
@Validated
public class CountController {

    private final CountService countService;

    @GetMapping
    public Result CountController() {
        return countService.getCount();
    }

    @GetMapping("/week")
    public Result weekData(){
        return countService.getWeekData();
    }

}
